FROM hub.atomgit.com/library/openjdk:21-bullseye

LABEL maintainer="ZZWCODE.COM"

RUN mkdir -p /zzwcode/java/springweb/logs  \
    /zzwcode/java/springweb/temp \

WORKDIR /zzwcode/java/springweb

ENV SERVER_PORT=8181 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""

EXPOSE ${SERVER_PORT}


ADD ./target/zzwcode-springweb.jar ./app.jar

ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
           -XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
           -jar app.jar